package Package.Example.Example_3;

import java.io.*;
import java.net.Socket;

public class Example_3 {
    public static final void Example_3() throws IOException {
        Socket s=new Socket("fe80::508a:f65d:115f:f05e%10",10086);
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
//        封装输出流对象
        BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(s.getOutputStream()));
        String len;
        while ((len = br.readLine()) != null) {
            if ("886".equals(len)) {
                break;
            }
//            OutputStream outputStream = s.getOutputStream();
//            outputStream.write(len.getBytes());
            bw.write(len);
            bw.newLine();
            bw.flush();
        }
        s.close();
    }
}
